<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link href="../lib/metro.css" rel="stylesheet">

    <title>Test Colors - Metro UI :: Popular HTML, CSS and JS library</title>

    <style>
        .box {
            width: 100px;
            height: 100px;
        }

        .red {
            background: #ffffff;
        }

        .yellow {
            background: #000000;
        }
    </style>
</head>
<body class="m4-cloak">
<div class="container">
    <h1>Colors test page</h1>

    <div class="box red"></div>
    <div class="box yellow"></div>
    <div class="box mixed"></div>
</div>

<script src="../lib/metro.js"></script>
<script>
    $(function(){
        // var rgb = new ColorPrimitive.RGB(0, 0, 0);
        // console.log(rgb.toString());

        // var c = new Color("#ff00cc");
        // var c2 = new Color("rgba(128, 116, 114, .5)");
        // var cm = Metro.colors-css;
        // console.log(c);
        // console.log(c.rgb()+"");
        // console.log(cm.getScheme("#ff00cc", 'mono', 'hex'));
        // console.log(c2.hex());

        // var color1 = "#ffffff";
        // var color2 = "#000000";
        // var color3;
        //
        // color3 = cm.mix(color1, color2);
        // console.log(color3.toString());
        //
        // $(".box.mixed").css("background", color3.toString());

        // var color4 = new Color("#00cc00");
        // console.log(color4.mix("#ffffff").rgb());
        // $(".box.mixed").css("background", color4.mix("#ffffff").rgb());

        // var myRGBColor = new Color("#ff00cc").toRGB();
        // var myHSVColor = myRGBColor.hsv();
        //
        // console.log(myRGBColor.type(), myRGBColor.toString()); // rgb, hsv(312,1,1)
        // console.log(myHSVColor.type(), myHSVColor.toString()); // hsv, hsv(312,1,1)
        // console.log(myHSVColor ); // hsv, hsv(312,1,1)

        // var myColor = new Color("#ff00cc").toRGBA();
        // console.log(myColor.toString());
        // myColor.channel("alpha", .5);
        // console.log(myColor.toString());

        var c = Farbe.Routines;

        var colorHex = "#ff00ff";
        var colorHsl = "hsl(300, 1, .5)";
        var colorHsl2 = "hsl(300, 100%, 50%)";

        console.log("To hsl: ", c.toHSL(colorHex));
        console.log("To hex: ", c.toHEX(colorHsl));
        console.log("To hex: ", c.toHEX(colorHsl2));
        // console.log("Must be #ff00ff", c.toHEX(colorHsl));

        console.log(Farbe.Primitives)
    })
</script>
</body>
</html>